package com.api.shopapi.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.api.shopapi.entity.*;
import com.api.shopapi.entity.dto.CheckinDTO;
import com.api.shopapi.entity.dto.CheckinDTO2;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author maochuan
 */
@Service
public interface CheckinService {
    int insert(Checkin checkin);

    int update(Checkin checkin);

    Checkin getByCheckinCode(String checkinCode);

    Checkin getByElderlyCodeAndInstitutionCode(String elderlyCode, String institutionCode);

    int delete(String checkinCode);

    PageInfo<Checkin> getPageList(int pageIndex, int pageSize, String institutionCode,String elderlyName,int status,String startTime,String endTime);

    int updateToStatus2(Checkin checkin, RetreatSettle retreatSettle, String elderlyCode,Berth berth,int isRefund);

    int RoomChangeToElderly(Checkin checkin, JSONObject jsonObject,double moneyPlan,RetreatSettle retreatSettle);

    int insertAndUpdateBerthStatus(Checkin checkin, Berth berth, JSONArray feeArr);

    int updateByCheckinCode(Checkin checkin, Berth berth,JSONArray feeArr);

    List<Checkin> getByCheckinSetmealCodeAndStatus1(String checkinSetmealCode);

    List<Checkin> getListByElderlyCode(String elderlyCode);

    int updateCheckinAndBerth(Checkin checkin, Berth berth);

    Checkin getByBerthCode(String berthCode,int status);

}
